package com.jzo2o.customer.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 服务人员认证审核表
 * @TableName worker_certification_audit
 */
@TableName(value ="worker_certification_audit")
@Data
public class WorkerCertificationAudit {
    /**
     * 主键
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 服务人员id
     */
    @TableField(value = "serve_provider_id")
    private Long serveProviderId;

    /**
     * 姓名
     */
    @TableField(value = "name")
    private String name;

    /**
     * 身份证号
     */
    @TableField(value = "id_card_no")
    private String idCardNo;

    /**
     * 身份证正面
     */
    @TableField(value = "front_img")
    private String frontImg;

    /**
     * 身份证反面
     */
    @TableField(value = "back_img")
    private String backImg;

    /**
     * 证明资料
     */
    @TableField(value = "certification_material")
    private String certificationMaterial;

    /**
     * 审核状态，0：未审核，1：已审核
     */
    @TableField(value = "audit_status")
    private Integer auditStatus;

    /**
     * 审核人id
     */
    @TableField(value = "auditor_id")
    private Long auditorId;

    /**
     * 审核人姓名
     */
    @TableField(value = "auditor_name")
    private String auditorName;

    /**
     * 审核时间
     */
    @TableField(value = "audit_time")
    private LocalDateTime auditTime;

    /**
     * 认证状态，1：认证中，2：认证成功，3认证失败
     */
    @TableField(value = "certification_status")
    private Integer certificationStatus;

    /**
     * 驳回原因
     */
    @TableField(value = "reject_reason")
    private String rejectReason;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WorkerCertificationAudit other = (WorkerCertificationAudit) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getServeProviderId() == null ? other.getServeProviderId() == null : this.getServeProviderId().equals(other.getServeProviderId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getIdCardNo() == null ? other.getIdCardNo() == null : this.getIdCardNo().equals(other.getIdCardNo()))
            && (this.getFrontImg() == null ? other.getFrontImg() == null : this.getFrontImg().equals(other.getFrontImg()))
            && (this.getBackImg() == null ? other.getBackImg() == null : this.getBackImg().equals(other.getBackImg()))
            && (this.getCertificationMaterial() == null ? other.getCertificationMaterial() == null : this.getCertificationMaterial().equals(other.getCertificationMaterial()))
            && (this.getAuditStatus() == null ? other.getAuditStatus() == null : this.getAuditStatus().equals(other.getAuditStatus()))
            && (this.getAuditorId() == null ? other.getAuditorId() == null : this.getAuditorId().equals(other.getAuditorId()))
            && (this.getAuditorName() == null ? other.getAuditorName() == null : this.getAuditorName().equals(other.getAuditorName()))
            && (this.getAuditTime() == null ? other.getAuditTime() == null : this.getAuditTime().equals(other.getAuditTime()))
            && (this.getCertificationStatus() == null ? other.getCertificationStatus() == null : this.getCertificationStatus().equals(other.getCertificationStatus()))
            && (this.getRejectReason() == null ? other.getRejectReason() == null : this.getRejectReason().equals(other.getRejectReason()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getServeProviderId() == null) ? 0 : getServeProviderId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getIdCardNo() == null) ? 0 : getIdCardNo().hashCode());
        result = prime * result + ((getFrontImg() == null) ? 0 : getFrontImg().hashCode());
        result = prime * result + ((getBackImg() == null) ? 0 : getBackImg().hashCode());
        result = prime * result + ((getCertificationMaterial() == null) ? 0 : getCertificationMaterial().hashCode());
        result = prime * result + ((getAuditStatus() == null) ? 0 : getAuditStatus().hashCode());
        result = prime * result + ((getAuditorId() == null) ? 0 : getAuditorId().hashCode());
        result = prime * result + ((getAuditorName() == null) ? 0 : getAuditorName().hashCode());
        result = prime * result + ((getAuditTime() == null) ? 0 : getAuditTime().hashCode());
        result = prime * result + ((getCertificationStatus() == null) ? 0 : getCertificationStatus().hashCode());
        result = prime * result + ((getRejectReason() == null) ? 0 : getRejectReason().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", serveProviderId=").append(serveProviderId);
        sb.append(", name=").append(name);
        sb.append(", idCardNo=").append(idCardNo);
        sb.append(", frontImg=").append(frontImg);
        sb.append(", backImg=").append(backImg);
        sb.append(", certificationMaterial=").append(certificationMaterial);
        sb.append(", auditStatus=").append(auditStatus);
        sb.append(", auditorId=").append(auditorId);
        sb.append(", auditorName=").append(auditorName);
        sb.append(", auditTime=").append(auditTime);
        sb.append(", certificationStatus=").append(certificationStatus);
        sb.append(", rejectReason=").append(rejectReason);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append("]");
        return sb.toString();
    }
}